index.html: index.imm.html
	htmlmin -s index.imm.html index.html

style.min.css: style.css
	cleancss style.css > style.min.css

script.min.js: script.js
	closure-compiler script.js --accept_const_keyword --compilation_level=advanced_optimizations > script.min.js

index.imm.html: guide.md script.min.js style.min.css Makefile
	pandoc -f markdown+smart -t html guide.md -o index.imm.html -s --self-contained --template template.html --include-in-header=script.min.js --css=style.min.css
